package com.techburg.xbrl.shared;

import java.util.Date;

public class XBRLDataBase {
  
  public enum FileType {
    INSTANCE("ins"), SCHEMA("xsd"), CALCULATION("cal"), REFERENCE("ref"), PRESENTATION("pre"), DEFINITION("def"); 
    private String value;
    private FileType (String value) { this.value = value; }
    public String value() { return value; }
  }
  
  public static class Company {
    
    private String cik;
    private String name;
    private String shortName;
    
    public Company(String cik, String name, String shortName) {
      this.cik = cik;
      this.name = name;
      if (Utils.isEmpty(shortName)) this.shortName = name;
      else this.shortName = shortName;
    }
    
    public String getCik() {
      return cik;
    }
    public void setCik(String cik) {
      this.cik = cik;
    }
    public String getName() {
      return name;
    }
    public void setName(String name) {
      this.name = name;
    }
    public String getShortName() {
      return shortName;
    }
    public void setShortName(String shortName) {
      this.shortName = shortName;
    }
    
  }
  
  public static class XBRLReport {
    private String reportId;
    private String reportType;
    private String cik;
    private Date reportDate; 
  }
  
  public static class XBRLReportFile {
    private String fileId;
    private String fileType; // types: instance, schema, presentation, calculation, definition, reference
    private String fileName;
    private String content;  // the raw xml content

    public XBRLReportFile(String fileId, String fileName, String fileType) {
      this.fileId = fileId;
      this.fileName = fileName;
      this.fileType = fileType;
    }
    
    public String getFileId() {
      return fileId;
    }
    
    public void setFileId(String fileId) {
      this.fileId = fileId;
    }
    
    public String getFileType() {
      return fileType;
    }
    
    public void setFileType(String fileType) {
      this.fileType = fileType;
    }
    
    public String getFileName() {
      return fileName;
    }
    
    public void setFileName(String fileName) {
      this.fileName = fileName;
    }
    
    public String getContent() {
      return content;
    }

    public void setContent(String content) {
      this.content = content;
    }
  }
  
  public static class XBRLInstance {
    private String instanceId;
    private String reportId;
  }

}
